diff options
| author | Adam Soltys <[email protected]> | 2024-11-05 00:10:30 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-05 00:10:30 -0800 |
| commit | 6775f5b7af42225fb18d445d36e3cf3e8f1cce15 (patch) | |
| tree | 1000b455727ac54e78e0cdeee72e9e2b63257198 /src/routes/(app)/[username] | |
| parent | d4fc66ff2f95c0aec57e59fe497d2c12e379d187 (diff) | |
| download | coinos-ui-6775f5b7af42225fb18d445d36e3cf3e8f1cce15.tar.gz coinos-ui-6775f5b7af42225fb18d445d36e3cf3e8f1cce15.zip | |
dark styles
Diffstat (limited to 'src/routes/(app)/[username]')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+layout.svelte | 42 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/receive/+page.svelte | 105 |
2 files changed, 40 insertions, 107 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index 5ad30f46..bb3c0d15 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -3,7 +3,6 @@ import { browser } from "$app/environment"; import { hexToUint8Array } from "uint8array-extras"; import { copy, f, get, post, s, sats, success, fail, si } from "$lib/utils"; - import Icon from "$comp/Icon.svelte"; import { t } from "$lib/translations"; import { sign, send } from "$lib/nostr"; import { bech32m } from "@scure/base"; @@ -127,7 +126,7 @@ class="flex text-3xl font-bold text-center mx-auto justify-center gap-2" > <div class="my-auto break-words">{display || username}</div> - <Icon icon="qr" style="w-8 invert my-auto" /> + <iconify-icon icon="ph:qr-code-bold" width="32" /> </button> {#if subject.address || subject.about} @@ -179,13 +178,10 @@ </div> <div class="flex mb-auto gap-1"> <button class="my-auto" on:click={() => copy(lnaddr)} - ><Icon - icon="copy" - style="max-w-max w-8 min-w-[32px]" - /></button + ><iconify-icon icon="ph:copy-bold" width="32" /></button > <a href={`/qr/${encodeURIComponent(lnaddr)}`} class="my-auto"> - <Icon icon="qr" style="invert max-w-max min-w-[32px]" /> + <iconify-icon icon="ph:qr-code-bold" width="32" /> </a> </div> </div> @@ -199,7 +195,7 @@ </div> <div class="flex mb-auto gap-1"> <button class="my-auto" on:click={() => copy(profile)} - ><Icon icon="copy" style="max-w-max w-8 min-w-[32px]" /></button + ><iconify-icon icon="ph:copy-bold" width="32" /></button > <a href={`/qr/${encodeURIComponent( @@ -207,7 +203,7 @@ )}`} class="my-auto" > - <Icon icon="qr" style="invert max-w-max min-w-[32px]" /> + <iconify-icon icon="ph:qr-code-bold" width="32" /> </a> </div> </div> @@ -220,10 +216,10 @@ </div> <div class="flex my-auto gap-1"> <button class="my-auto" on:click={() => copy(npub)} - ><Icon icon="copy" style="max-w-max w-8 min-w-[32px]" /></button + ><iconify-icon icon="ph:copy-bold" width="32" /></button > <a href={`/qr/${encodeURIComponent(npub)}`} class="my-auto"> - <Icon icon="qr" style="invert max-w-max min-w-[32px]" /> + <iconify-icon icon="ph:qr-code-bold" width="32" /> </a> </div> </div> @@ -234,24 +230,14 @@ <div class="flex flex-wrap gap-2 w-full text-lg"> {#if user && user.username !== subject.username && subject.pubkey} {#if following} - <button - class="mx-auto rounded-2xl border py-2 px-3 font-bold hover:opacity-80 flex bg-black text-white grow" - on:click={unfollow} - > - <div class="mx-auto flex"> - <Icon icon={"profile"} style="my-auto w-8 mr-2 invert" /> - <div class="my-auto">{$t("user.unfollow")}</div> - </div> + <button class="btn" on:click={unfollow}> + <iconify-icon icon="ph:user-bold" width="32" /> + <div class="my-auto">{$t("user.unfollow")}</div> </button> {:else} - <button - class="mx-auto rounded-2xl border py-2 px-3 font-bold hover:opacity-80 flex grow" - on:click={follow} - > - <div class="mx-auto flex"> - <Icon icon={"profile"} style="my-auto h-6 mr-2" /> - <div class="my-auto">{$t("user.follow")}</div> - </div> + <button class="btn" on:click={follow}> + <iconify-icon icon="ph:user-bold" width="32" /> + <div class="my-auto">{$t("user.follow")}</div> </button> {/if} {/if} @@ -277,7 +263,7 @@ class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex w-60" > <div class="mx-auto flex"> - <Icon icon="clock" style="mr-2 my-auto w-8" /> + <iconify-icon icon="ph:clock" width="32" /> </div> </button> </form> diff --git a/src/routes/(app)/[username]/receive/+page.svelte b/src/routes/(app)/[username]/receive/+page.svelte index 446003e2..e9e5ca43 100644 --- a/src/routes/(app)/[username]/receive/+page.svelte +++ b/src/routes/(app)/[username]/receive/+page.svelte @@ -5,6 +5,8 @@ import { browser } from "$app/environment"; import { last, showQr, amountPrompt } from "$lib/store"; import Avatar from "$comp/Avatar.svelte"; + import InvoiceData from "$comp/InvoiceData.svelte"; + import InvoiceActions from "$comp/InvoiceActions.svelte"; import InvoiceTypes from "$comp/InvoiceTypes.svelte"; import SetAmount from "$comp/SetAmount.svelte"; import { t } from "$lib/translations"; @@ -80,87 +82,32 @@ </script> <div class="invoice container mx-auto max-w-xl px-4 space-y-2"> - {#if $showQr} - <div> - <a href={link}> - <img - {src} - class="mx-auto z-10 max-w-[360px] border-4 border-white" - bind:this={qr} - alt={txt} - /> - </a> - </div> - {/if} - - <div class="break-all text-center text-secondary text-xl"> + <InvoiceData + {src} + {link} + {qr} {txt} - </div> - - {#each invoice.items as i} - <div class="grid grid-cols-12 text-xl"> - <div class="col-span-1 my-auto">{i.quantity}</div> - <div class="mr-auto grow col-span-7 my-auto"> - {i.name} - </div> - <div class="col-span-2 font-semibold text-right my-auto"> - {f(i.price * i.quantity, currency)} - </div> - <div class="col-span-2 text-secondary text-right text-lg my-auto"> - {sat(btc(i.price * i.quantity, rate))} - </div> - </div> - {/each} - - {#if amount > 0} - <div class="text-center font-bold text-2xl"> - <div> - {f(amountFiat, currency)} - - {#if tip} - <span class="text-sm"> - +{f(tip * (rate / sats), currency)} - </span> - {/if} - </div> - <div> - <span class="text-secondary font-normal text-xl" - >⚡️{`${s(amount)}`}</span - > + {invoice} + {amount} + {amountFiat} + {currency} + {tip} + {rate} + showQr={$showQr} + /> - {#if tip} - <span class="text-sm text-secondary font-normal"> - +⚡️{s(tip)} - </span> - {/if} - </div> - </div> - {/if} - - <div class="text-secondary space-y-2 text-xl pt-2"> - <button type="button" class="btn" on:click={() => copy(txt)}> - <iconify-icon icon="ph:copy-bold" width="32" /> - <div class="my-auto"> - {$t("payments.copy")} - </div> - </button> - - {#if user?.id === invoice?.user?.id} - <button class="btn" on:click={toggleAmount}> - <iconify-icon icon="ph:pencil-bold" width="32" /> - <div class="my-auto">{$t("payments.setAmount")}</div> - </button> - {:else} - <a href={link} class="w-full"> - <button - class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80" - > - <iconify-icon icon="ph:device-mobile-bold" width="32" /> - <div class="my-auto">{$t("payments.openLink")}</div> - </button> - </a> - {/if} - </div> + <InvoiceActions + {toggleAmount} + {user} + {invoice} + {copy} + {link} + {type} + {types} + {showQr} + {txt} + t={$t} + /> <InvoiceTypes {aid} {user} {type} {types} {setType} t={$t} /> </div> |
